<link rel="stylesheet" type="text/css" href="../addons/jy_merch/resource/css/list.css?v=3">
<div ng-include="sys_html('common/_header')"></div>
<style>
.myshop-header {border-radius:0.5rem;background:#fff;padding:0.5rem 0.8rem}
.myshop-header .shoplogo {height: 3.5rem; width: 3.5rem; background: #fff; position: absolute; top: 3.5rem; right: 0.8rem; border: 1px solid #eee;border-radius: .2rem}
.myshop-header .shoplogo img {height: 100%; width: 100%; display: block;border-radius: .2rem}
#page-loading .sk-spinner-three-bounce div{background-color: #ffa000}
.sk-spinner-three-bounce div {
	background-color: #ffa000;
}
.btn.btn-danger {
    background: #ffa000;
    border: 1px solid #ffa000;
	
}
.fui-navbar .nav-item.btn {
	font-weight:bold;
    color:#000;
}
.fui-navbar .nav-item.active, .fui-navbar .nav-item:active {
    color: #ffa000;
}
.fui-navbar .nav-item.active .label, .fui-navbar .nav-item:active .label {
    color: #ffa000;
}
.fui-tab.fui-tab-danger a.active {
    border-color: #ffa000;
}
.fui-cell-group .fui-cell.changepwd .fui-cell-text {
    border: 1px solid #ffa000;
    color: #ffa000;
    background: #fff;
}
.fui-cell-group .fui-cell.btn-logout .fui-cell-text {
    background: #ffa000;
}
.btn.btn-danger-o {
    background: transparent;
    color: #ffa000;
    border: 1px solid #ffa000;
}
.text-danger {
    color: #ffa000;
}
.jylabel-red-o.active, .jylabel-red-o:focus, .jylabel-red-o:hover, .jylabel-red-o[href]:focus, .jylabel-red-o[href]:hover {
    border: 1px solid #ffa000;
    color: #ffa000;
}
.order-create-page .no-address {
    color:#ffa000;border: 1px solid #ffa000
}
.fe-floatback a{
    background-color: #fde24d;
	color:#000;
}
.fixed-title {
	color:#ffa000;
}
.red, .red a, .red i {
    color: #ffa000;
}
.fui-fullHigh-item.menu {
    width: 5.25rem;
    background: #fff;
	color: #333;
}
.fui-fullHigh-item.menu nav.on {
    background: #f5f5f5;
    color: #ffa000;
}
.fui-fullHigh-item.menu nav.on:before {
    border-left: 0 solid #ff5555;
}
.parent-category{float:left; width:100%; height:auto; min-height:100%;}
.parent-category ul{margin:0; padding:0; width:100%;}
.parent-category ul li{list-style:none; text-align:center; height:50px; line-height:50px; white-space:nowrap; width:100%; border-bottom:1px solid #e0e0e0; position:relative; right:-1px;}
.parent-category ul li.active{border-right:1px solid #fff; z-index: 10000}
.parent-category ul li a{color:#333; display:inline-block; width:100%; height:100%; text-decoration:none;}
.parent-category ul li.active a{color:#09ba07;}
.children-category{width:100%; min-height:100%; height:auto; color: #252525;}
.children-category ul{list-style:none; margin:0; padding:0; overflow-y:auto; overflow-x:hidden; border-left:1px solid #e0e0e0; min-height:100%;}
.children-category ul li{text-align:left; height: 32px; line-height: 32px; padding-left: 15px}
.children-category ul li.delivery-tips{height:25px; line-height:25px; margin-top: -15px; font-size: .65rem; color: #ff2d4b}
.children-category ul li a{display:inline-block; width:100%; height:100%; text-decoration:none; color:#333;}
.children-category ul li a span{font-size: .6rem; color: #999;}
.children-category .block{display:block; color:#ef1e15; font-size:.6rem;}
.content-group {background:#fff;border-radius: 0.5rem;margin-bottom:0.39rem}
.merchname {display:none}
.fui-tab-scroll .item a {color:#999}
.fui-tab-scroll .item.on,.fui-tab-scroll .item.on a{color:#6a5c4f;}
.fui-tab-scroll .item.on:before {background:linear-gradient(to right,rgba(251,183,26,1),rgba(251,183,26,0));}
.jylabel-red {border: 0 solid #ebebeb;background-color:#fef7dd;color:#c89136}
.yellow {color:#ffa000}
.yellow2 {color:#ffcb51}
.active {
    color: #ffa000;
}
.fui-icon-group .fui-icon-col .text {
    color: #999;
}
.fui-icon-group .fui-icon-col .text.active{
    color:#ffa000
}
.fui-tag-red {
    background: #ffa000;
}
.btn.btn-red-o {
	color: #000;
	font-weight:bold;
	border: 1px solid #ffa000;
	background-color:#ffa000;
}
.jylabel-red-0.active,.jylabel-red-0:focus,.jylabel-red-0:hover,.jylabel-red-0[href]:focus,.jylabel-red-0[href]:hover {
	border: 1px solid #ffa000;
	background-color:#fbf4e4;color:ffa000;
	color:#ffa000;
}
.yuyue-duan {background:#fff;border: 0 solid #fff;border-radius: 4px;padding:0.1rem;margin:0.25rem 0.1rem;height:auto;width:auto;font-size:0.6rem;text-align:center}
.yuyue-duan.active{background:#fef7dd;}
.red {
    color: #ffa000;
}
.modal-footer .mod-success {
    background: #ffa000;
	color:#000;
}
.price {color:#fb5032}
.fe-floatback {
    top: 1rem;
}
.dot2{
	background: #eb0101;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.6rem;
    height: 0.8rem;
    line-height: 0.8rem;
    margin-left: 0.1rem;
    min-width: 0.8rem;
    padding: 0 0.2rem;
    position: absolute;
    top: 0;
    left: 0.3rem;
    vertical-align: top;
    text-align: center;
    z-index: 11;
}
.quick-num .plus {
    background: #ffa000;
	color: #000;
}
.quick-num .minus {
    color: #ffa000;
    border: 1px solid #ffa000;
}
.quick-list .quick-item .info .title {
    font-size: 0.75rem;
    line-height: 0.9rem;
}
.fui-tab-scroll .item.on:before {content: ""; height: 3px; width: 40%; background: #ffa000; position: absolute; bottom:0; left: 30%}
.fui-footer.quick {box-shadow:0 0 0 rgba(0,0,0,0);height:3rem;background: none;padding:0.2rem 0.5rem}
.fui-footer.quick .quick-cart {
    width:3rem;background: #000;color:#ffcb51;border-top-left-radius: 1.35rem;border-bottom-left-radius: 1.35rem;
}
.fui-footer.quick .quick-info{color:#9e9e9e;position: relative;background: #000;padding-left:0;border-left: 2px solid #fff;border-right: 0 solid #fff;}
.fui-footer.quick .quick-info .icon{position: absolute;top:-0.5rem;}
.fui-footer.quick .quick-info.action .icon{color:#ffa000}
.fui-footer.quick .quick-submit {
    height:auto;background: #ffcb51;color:#000;border-top-right-radius: 1.35rem;border-bottom-right-radius: 1.35rem;
}
</style>
<style type="text/css">
.line-notice {
    position: relative;
	font-size:.75rem;
	padding: 0.35rem 0;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-moz-transition-duration: 300ms;
	-webkit-transition-duration: 300ms;
	transition-duration: 300ms;
	-webkit-transition-property: background-color;
	transition-property: background-color;
	line-height: 1;
	overflow: hidden;
}
.line-notice .line-notice-label {
	position: relative;
	display: block;
	width: auto;
	color: #666;
}
.line-notice .line-notice-info {
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	white-space: nowrap;
	text-overflow: ellipsis;
    overflow: hidden;
	color:#666;
}
.line-notice .line-notice-animation {
	display: flex;
	overflow: hidden;
	margin-left:0.3rem;
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
	white-space: nowrap;
}
.line-notice .line-notice-remark {
	color: #999;
	text-align: right;
	margin-right: .2rem;
	line-height: 1.1;
}
.line-animation {
    animation: 30s wordsLoop linear infinite normal;
}
@keyframes wordsLoop {
            0% {
                transform: translateX(200px);
                -webkit-transform: translateX(200px);
            }
            100% {
                transform: translateX(-100%);
                -webkit-transform: translateX(-100%);
            }
}
@-webkit-keyframes wordsLoop {
            0% {
                transform: translateX(200px);
                -webkit-transform: translateX(200px);
            }
            100% {
                transform: translateX(-100%);
                -webkit-transform: translateX(-100%);
            }
}
</style>
<div class='fui-page fui-page-current' style="background:#fff">
    <div class="fui-content quick" style="margin-bottom:0;padding-bottom:0">
		<!-- 滚动后出现 -->
		<div ng-if="showtopheader" class="fui-header searchtop" style="height:2.6rem;background:#fff">
			<div class="fui-header-left" style="height: 2.5rem;">
				<a class="back" href="javascript:" ng-click="goback()"></a>
			</div>
			<div class="fui-header-input" style="top:0.3rem;right:0.5rem">
				<div class="searchbar searchbar-active" style="margin-left:1.6rem">
						<div class="search-input" style="margin-right:4rem">
							<i id="searchsub" class="icon icon-sousuo1" ng-click="pagedata.get_list(1)"></i>
							<input type="search" placeholder="请输入商品名称" class="search" ng-model="pagedata.params.keyword" style="text-align: left; color: #999; font-size:0.6rem;background:#f9f9f9;border-radius: 1rem;border: 0 solid #ddd;" />
						</div>
				</div>
			</div>
			<div class="fui-header-right" style="padding-right:0.5rem;line-height:2rem">
					<i class="icon icon-fenxiang2" onclick="$('#showsharecover').modal();" style="font-size: 1rem;margin-right:10px"></i>
					<i class="icon icon-liaotian" ng-click="access_json('jy_city/myhome/')" style="font-size: 1rem;"></i>
			</div>
		</div>
		<div ng-if="!showtopheader" class="fe-floatback" style="left: 4px;">
			<a href="javascript:void(0);" ng-click="access_json('jy_city/index/')">
			<i class="icon icon-back bold" style="font-size:1rem;color:#000;"></i>
			</a>
		</div>
		<div class="fe-floatback bold" style="position: absolute;width: 8rem;padding:0.3rem 0.2rem;left:50%;margin-left:-4rem;height:1.6rem;border-radius:1.6rem;background-color: #fde24d;color: #000;line-height: 0.8rem;opacity: 0.6;">
			<div class="overflow-h" style="width:7.6rem;line-height:0.6rem;font-size:0.5rem;"><i class="icon icon-position" style="font-size:0.4rem"></i> {{pagedata.myshop.address || '未定义店铺地址'}}</div>
			<div style="line-height:0.6rem;font-size:0.5rem">{{pagedata.myshop.merchname || '未定义店铺名称'}}</div>
		</div>
			<div style="width:100%;height:5rem;background:url({{tomedia(pagedata.myshop.topimg) || '../addons/jy_merch/resource/images/myshoptop.jpg'}});no-repeat 50%;background-size: cover;background-position:top center;">
			</div>
			<div class="myshop-header" style="margin-top:-1rem;padding-top:0.2rem">
					<div class="title bold" style="width:100%;font-size:1.3rem">{{pagedata.myshop.merchname || '平台自营'}}</div>
					<div class="subtitle">
								<div class="store-moneylimit">
									<i class="icon icon-shoucang-tianchong yellow" style="font-size:0.6rem"> {{pagedata.myshop.star || '5.0'}}</i>
									<span style="margin-left:0.2rem"> 销量 {{pagedata.myshop.salenum || 0}}</span>
									<span ng-if="pagedata.myshop.out_juli>=pagedata.myshop.juli" class="store-distance">{{pagedata.myshop.juli || 0}}km | 约{{pagedata.myshop.peisongtime || 50}}分钟</span>
									<span ng-if="pagedata.myshop.out_juli<pagedata.myshop.juli" class="store-distance"><span class="yellow">超出</span>配送范围({{pagedata.myshop.out_juli}}km)</span></span>
								</div>
					</div>
					<div class="subtitle" style="font-size:0.55rem">
						<div class="jylabel jylabel-red" style="">{{pagedata.myshop.tags}}</div>
					</div>
					<div class="subtitle" ng-click="access_json('jy_weishop/coupon.index//merchid='+pagedata.myshop.id)" style="padding:0.3rem 0">
						<div style="overflow-x:scroll;white-space:nowrap">
						<span ng-repeat="c in pagedata.myshop.coupons" class="jylabel jylabel-red" style="font-size:0.55rem;border-radius: 0.2rem;background-color:#fff;color:red;border: 1px solid red;margin-right:0.2rem">{{c.title}}</span>
						</div>
					</div>
					<div class="subtitle" style="font-size:0.55rem">
							简介：{{pagedata.myshop.desc || '暂无店铺描述'}}
					</div>
					<div ng-if="pagedata.myshop.remark" class="line-notice" style="padding:0.5rem 0">
						<div class="line-notice-label"><i class="icon icon-seeraudio"></i></div>
						<div class="line-notice-animation" style="display: flex;">
							<div class="line-animation">{{pagedata.myshop.remark}}</div>
						</div>
					</div>
					<div class="shoplogo">
							<img ng-src="{{tomedia(pagedata.myshop.logo) || '../addons/jy_merch/resource/images/nologo.png'}}"  />
					</div>
			</div>
			<div class="fui-tab-scroll">
				<div ng-class="{'item':1,'on':pagedata.showlist=='goods'}" style="margin-right:1.5rem"><a href="javascript:;" ng-click="pagedata.showlist='goods';">商品</a></div>
				<div ng-class="{'item':1,'on':pagedata.showlist=='pingjia'}" style="margin-right:1.5rem"><a href="javascript:;" ng-click="pagedata.showlist='pingjia';">评价 <span class="subtitle">{{pagedata.myshop.commentsnum || 0}}</span></a></div>
				<div ng-class="{'item':1,'on':pagedata.showlist=='merch'}" style="position: relative;padding-right:1rem;"><a href="javascript:;" ng-click="pagedata.showlist='merch';">商家</a> <span class="dot" style="top:0.2rem;background:#ffa000">故事</span></div>
			</div>
            <div ng-if="pagedata.showlist=='goods'" class="fui-fullHigh-group">
                <div class="fui-fullHigh-item menu" style="width:4.4rem;padding-top:0.2rem; padding-bottom: 3rem;">
					<nav ng-repeat="item in pagedata.category" style="line-height: 3;height:auto" ng-click="pagedata.nowckey=$index;pagedata.params.pcate=item.id;pagedata.get_list(true)" ng-class="{'on':pagedata.nowckey==$index}">
						<div ng-class="{'subtitle':1,'red':pagedata.nowckey==$index}" style="line-height:3">{{item.title || '未命名'}}</div>
						<div ng-show="item.total" class="dot" style="display: block;">{{item.total}}</div>
					</nav>
				</div>
                <div class="fui-fullHigh-item container" style="padding-bottom: 4rem;">
                    <div ng-repeat="item in pagedata.category" ng-if="pagedata.nowckey==$index" class="quick-list">
						 <div class="fui-cell-title bold" style="font-size:0.75rem;padding-bottom:0">{{item.title || '未命名'}} <i class="icon icon-fengexianyou"></i></div>
						 <div class="content-empty" ng-if="!pagedata.goodslist || pagedata.goodslist.length<1">
							  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">暂时没有商品！</p>
						</div>
                        <div id="list">
							    <div class="quick-item" ng-repeat="(gkey,g) in pagedata.goodslist">
									<a class="thumb" href="javascript:;" ng-click="pagedata.getgoodsdetail(g.id);" data-nocache="true" style="width:5rem;height:5rem">
										<img ng-src="{{tomedia(g.image) || '../addons/jy_city/resource/images/nologo.png'}}"/>
									</a>
									<div class="info">
										<div ng-class="{'title bold overflow-h':1,'yellow':g.id==pagedata.fromgoods.id}">{{g.title}}</div>
										<div style="font-size:0.55rem"><span style='color:#999;'>已售:{{g.salenum || 0}}</span> <span ng-if="g.isshowtotal==1">库存:{{g.total}}</span></div>
										<div class=""><span ng-if="g.active.price" style='font-size:0.55rem;color:red;'>{{g.active.title}}</span><span class="price">￥ <span ng-if="!g.active.price" style="font-weight:bold;font-size:1rem;">{{g.price}}</span><span ng-if="g.active.price" style="font-weight:bold;font-size:1rem;">{{g.active.price}}</span> /{{g.unit || '份'}}<span ng-if="!pagedata.pluginset.noweight && g.weight>0" style="color:#999;font-size:0.55rem;font-weight:400">({{g.weight}}kg)</span></span></div>
										<div ng-if="g.red_fee>0" class="goods-tag" style="font-size:0.6rem;">
											<div class="fui-tag fui-tag-danger fee-tag-zi" style="font-size:0.6rem;margin-right:0.15rem;padding: 0.2rem 0.15rem;">节省￥{{g.red_fee || '0.00'}}</div>
										</div>
										<div class="buyline" style="margin-top:0.5rem">
											<div class="buy">
												<div ng-show="(!g.specs_list || g.specs_list.length < 1) && g.total>0" ng-class="{'quick-num':true, 'open':g.carttotal>0}">
													<div ng-click="pagedata.minus(g)" class="minus icon icon-subtract"></div>
													<div class="num" style="color:#999">{{g.carttotal}}</div>
													<div ng-click="pagedata.plus(g)" class="plus icon  icon-tianjia"></div>
												</div>
												<div ng-show="(!g.specs_list || g.specs_list.length < 1) && g.total==0" class="quick-num">
													<div class="btn btn-sm btn-danger disabled" style="line-height:1.4;">已售馨</div>
												</div>
												<div ng-show="g.specs_list.length > 0" ng-class="{'quick-num':true, 'open':g.carttotal>0}">
													<div class="btn btn-sm btn-red-o order-finish" style="line-height:1.4" onclick="$('#selecttaocan').modal();" ng-click="pagedata.g=g;pagedata.nowgkey=gkey;pagedata.nowckey=$index;" >选规格</div>
													<div ng-show="g.total" class="dot" style="display: block;">{{g.carttotal}}</div>
												</div>
											</div>
										</div>
									</div>
								</div>
						</div>
                    </div>
                </div>
            </div>
			<div ng-if="pagedata.showlist =='pingjia'">
				<div class="fui-cell-group" style="margin-top:0">
				<div class="fui-cell" ng-if="pagedata.commentsnum>0" style="margin-bottom:-0.3rem">
					<div class="fui-cell-text option-selector">评价({{pagedata.commentsnum}})</div>
					<div class="fui-cell-remark noremark">好评度<span style="color:red">{{pagedata.commentsfen.percent}}%</span></div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info">
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='all'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=all',true);pagedata.comments_type='all'">全部 {{pagedata.commentsnum}}+</span>
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='new'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=new',true);pagedata.comments_type=''">最新的</span>
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=percent',true);pagedata.comments_type='percent'">非常不错 {{pagedata.commentsfen.count.good}}+</span>
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='normal_percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=normal_percent',true);pagedata.comments_type='normal_percent'">感觉一般 {{pagedata.commentsfen.count.normal}}+</span>
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='bad_percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=bad_percent',true);pagedata.comments_type='bad_percent'">差评 {{pagedata.commentsfen.count.bad}}+</span>
						<span ng-class="{'jylabels jylabel-red':1,'active':pagedata.comments_type=='pic'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=pic',true);pagedata.comments_type='pic'">有图的 {{pagedata.commentsfen.count.pic}}+</span>
					</div>
				</div>
				<div ng-if="pagedata.list.length>0" class="container">
				<!--评论展示区-->
					<div ng-include="sys_html('goods/comments','','jy_weishop')"></div>
				</div>
				</div>
				 <div class='content-empty' ng-if="pagedata.list.length<1">
					<i class='icon icon-pingjia1'></i><br/>暂时没有任何评价
				</div>
				<div ng-if="loading" class='infinite-loading'><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
			</div>
			<div ng-if="pagedata.showlist =='merch'" style="padding:0 0.2rem;margin-bottom:1rem">
				<div class="fui-list-group" style="margin-top:0">  
				   <div class="fui-list">
						<div class="fui-list-inner">					
							<div class="subtitle">营业时间：{{pagedata.myshop.onlinetime.star}}-{{pagedata.myshop.onlinetime.end}}</div>
							<span ng-show="pagedata.myshop.hastag==1" ng-repeat="tag in pagedata.myshop.taglist" class="shop-label shop-label-danger">{{tag}}</span>
						</div>
					</div>
					<div class="fui-list">
						<div class="fui-list-inner">
							<div class="subtitle">简介：{{pagedata.myshop.desc || '暂无店铺描述'}}</div>
						</div>
					</div>
			</div>
			<div class="fui-list-group">
				<div class="fui-list">
						<div class="fui-list-inner">					
							<div class="subtitle">联系人: {{pagedata.myshop.realname}}</div>
						</div>
				</div>
				<div class="fui-list">
						<div class="fui-list-inner">					
							<div class="subtitle">联系电话: {{pagedata.myshop.mobile}}</div>
						</div>
				</div>
				<div class="fui-list">
						<a class="fui-list-inner" href="tel:{{pagedata.myshop.tel || pagedata.myshop.mobile}}">					
							<div class="subtitle"><i class="icon icon-tongxun" style="color:#18bc9c"></i> {{pagedata.myshop.tel || pagedata.myshop.mobile}}</div>
						</a>
				</div>
				<div class="fui-list" href="javascript:" ng-click="pagedata.openLocation(pagedata.myshop);">
						<div class="fui-list-inner">					
							<div class="subtitle"><i class="icon jinyunicon icon-ditu" style="color:#18bc9c"></i> {{pagedata.myshop.address}}</div>
						</div>
				</div>
			 </div>
			 <div ng-if="pagedata.myshop.businessimg" class="weui_cells_title">营业资质</div>
			 <div ng-if="pagedata.myshop.businessimg || pagedata.myshop.licenseimg" class="weui_cells">
				<div ng-if="pagedata.myshop.businessimg" class="weui_cell">
					<div style="margin:0.1rem 0">					
						<img style="width:100%" ng-src="{{tomedia(pagedata.myshop.businessimg) || '../core/resource/images/nopic.jpg'}}">
					</div>
				</div>
				<div ng-if="pagedata.myshop.licenseimg" class="weui_cell">
					<div style="margin:0.1rem 0">					
						<img style="width:100%" ng-src="{{tomedia(pagedata.myshop.licenseimg) || '../core/resource/images/nopic.jpg'}}">
					</div>
				</div>
			 </div>
			 <div class="weui_cells_title">商户详情</div>
			 <div class="weui_cells weui_cells_form">
					<div class="content-block content-images" ng-bind-html="trust(pagedata.myshop.content)"></div>
			 </div>
			</div>
	</div>
	<div id="selecttaocan" class="modal fade" tabindex="-1" style="z-index: 99999; display: none;">
					<div class="modal-dialog" style="width:90%;bottom:20%;left:5%;">
						<div class="modal-content" style="border-radius: 0.3rem;padding-top:1rem">
								<div aria-hidden="true" data-dismiss="modal" class="closebtn red" style="top:0.2rem;right:0.2rem"><i class="icon jinyunicon icon-close" style="font-size:1rem"></i></div>
								<div class="fixed-title">
									 <span class="befirst spacing">
										 <span class="icon icon-icon-xiexiantiao" style="color:#f9cc80"></span>
										 <span class="icon icon-icon-xiexiantiao" style="color:#e09c28"></span>
										 <span class="icon icon-icon-xiexiantiao" style="color:#d18301"></span>
									 </span> 
									 <span class="title-text">{{pagedata.g.title}}</span> 
									 <span class="spacing">
										 <span class="icon icon-icon-xiexiantiao" style="color:#d18301"></span>
										 <span class="icon icon-icon-xiexiantiao" style="color:#e09c28"></span>
										 <span class="icon icon-icon-xiexiantiao" style="color:#f9cc80"></span>
									 </span>
								 </div>
								 <div class="subtitle text-center" style="color:#999;font-size:0.6rem">
								 当前: {{pagedata.g.selespename}}
								 </div>
								 <div class="subtitle text-center" style="color:#999;font-size:0.6rem">
								    <span style="margin-right:0.2rem" ng-repeat="p in pagedata.g.post" ng-if="p.num>0">{{p.title}} * <span class="red">{{p.num}}</span></span>
								 </div>
								<div class="row margin0" style="padding-bottom:2.8rem">
									<div ng-repeat="(k,spec) in pagedata.g.specs_list" class="option-picker-cell option spec">
										<div class="fui-cell-group">
											<div class="fui-cell-title subtitle" style="color:#999;font-size:0.6rem">{{spec.title}}</div>
											<div class="fui-cell" style="padding-top:0.2rem">
												<div class="fui-cell-info">
													<span ng-repeat="item in spec.items" ng-class="{'jylabels jylabel-red-o':1,'active':pagedata.g.specid[k]==item.id}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="pagedata.g.specid[k]=item.id;pagedata.get_optionsid();">{{item.title}}</span>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="fui-footer quick" style="height:2rem;padding:0;border-bottom-left-radius: 0.3rem;border-bottom-right-radius: 0.3rem;">
											<div class="quick-info" style="height:2rem;border-left: 0 solid #fff;border-bottom-left-radius: 0.3rem;">
													<p class="price" style="font-size:0.8rem;line-height:1.2rem">￥{{pagedata.g.options.price || 0.00}}/{{pagedata.g.unit||'份'}}<span ng-if="!pagedata.pluginset.noweight && pagedata.g.options.weight>0" style="color:#f2f2f2;font-size:0.55rem;font-weight:400">({{pagedata.g.options.weight}}kg)</span></p>
											</div>
											<div ng-show="pagedata.g.options.stock>0 && pagedata.g.post[pagedata.g.options.id].num<1" class="quick-submit" style="border-radius:0;height:2rem;margin: 0;font-size:0.65rem;line-height:1.6rem;padding-top:0.4rem;border-bottom-right-radius: 0.3rem;" href="javascript:;" ng-click="pagedata.sp_plus(pagedata.g,$index);">
												<div class="bold" style="line-height:1">加入购物车</div>
												<div style="line-height:1">Add to Cart</div>
											</div>
											<div ng-show="pagedata.g.options.stock==0 && pagedata.g.post[pagedata.g.options.id].num<1" class="quick-submit" style="border-radius:0;height:2rem;margin: 0;font-size:0.65rem;line-height:1.6rem;padding-top:0.4rem;color:#f60;border-bottom-right-radius: 0.3rem;">
												<div class="bold" style="line-height:1">已售馨</div>
												<div style="line-height:1">Is Sold</div>
											</div>
											<div ng-show="pagedata.g.post[pagedata.g.options.id].num>0"class="quick-submit" style="border-radius:0;height:2rem;margin: 0;font-size:0.8rem;line-height:1.2rem;border-bottom-right-radius: 0.3rem;">
													<div class="quick-num open" style="margin-top:0.4rem">
														<div ng-click="pagedata.sp_minus()" class="minus icon icon-subtract bold" style="color: #000; background:none;border: 1px solid #000;font-size: 0.8rem;"></div>
														<div class="num red bold" style="color:#000">{{pagedata.g.post[pagedata.g.options.id].num}}</div>
														<div ng-click="pagedata.sp_plus()" class="plus icon icon-tianjia bold" style="border: 1px solid #000;font-size: 0.8rem;"></div>
													</div>
											</div>
								</div>
								<div class="clear"></div>
						</div>
					</div>
	</div>
	<div ng-if="pagedata.myshop.isrest==0" class="fui-footer quick">
		<p style="font-size:16px;color:#fff;margin-top:8px;width:100%;text-align: center;">商家休息中,暂不接单</p>
	</div>
		<!-- 底部菜单 -->
		<div ng-show="pagedata.showcarts" class="popup">
			<div class="popup-body">
			<div class="popup-bottom">
				<div class="fui-cell-group" style="margin-top:0;padding-top:1rem;margin-bottom:3rem">
					<i ng-click="pagedata.showcarts=false" class="closed icon icon-close red" style="font-size:1rem;"></i>
					<div class="fixed-title">
							 <span class="befirst spacing">
								<span class="icon icon-icon-xiexiantiao" style="color:#f9cc80"></span>
								<span class="icon icon-icon-xiexiantiao" style="color:#e09c28"></span>
								<span class="icon icon-icon-xiexiantiao" style="color:#d18301"></span>
							 </span> 
							 <span class="title-text">已选商品</span> 
							 <span class="spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#d18301"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e09c28"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#f9cc80"></span>
							 </span>
					</div>
					<div ng-repeat="item in pagedata.carts" ng-if="item.total>0" class="fui-cell">
							<div class="fui-cell-text">
								{{item.title}}<span class="subtitle" ng-if="item.optiontitle">({{item.optiontitle}})</span>
							</div>
							<div class="fui-cell-remark noremark">
								<span class="r-f red" style="margin-right:1rem">￥ {{item.price * item.total}} /{{item.unit ||'件'}}<span style="font-size:0.6rem;color:#999" ng-if="item.weight!='0.00'">（{{item.weight}}kg）</span></span>
							</div>
							<div class="fui-cell-remark noremark">
								<div class="quick-num open">
									<div ng-click="pagedata.minus(item,true)" class="minus icon icon-subtract" style="font-size:0.8rem"></div>
									<div class="num" style="color:#333">{{item.total}}</div>
									<div ng-click="pagedata.plus(item,true)" class="plus icon icon-tianjia" style="font-size:0.8rem"></div>
								</div>
							</div>
					</div>
				</div>
				<div ng-if="pagedata.myshop.isrest != 0 && pagedata.allnum>0" class="fui-footer quick" style="">
					<div ng-click="pagedata.showcarts=false" ng-class="{'quick-cart':true,'empty':pagedata.allnum < 1}" style="width:2.6rem">
						<div class="dot" style="display: block;">{{pagedata.allnum}}</div>
						<i class="icon jinyunicon icon-gouwuchexuanzhong" style="line-height:2.5rem;padding:0.3rem 0.5rem;font-size:1.8rem;color:#ffcb51;"></i>
					</div>
					<div class="quick-info" style="padding-left:0.3rem">
						<p style="color:#ffcb51">￥<span class="price" style="color:#ffcb51;font-weight:400">{{pagedata.showprice}}</span></p>
					</div>
					<div class="quick-submit remark bold" href="javascript:;" ng-click="access_json('jy_city/create//merchid='+pagedata.myshop.id)" style="background: #ffcb51;color:#000;">
						选好了
					</div>
				</div>
			</div>
			</div>
		</div>
		<div ng-if="pagedata.myshop.offline!=1 && pagedata.showlist=='goods'" class="fui-footer quick" style="box-shadow:0 0 0 rgba(0,0,0,0);height:3rem;background: none;padding:0.2rem 0.5rem">
			<div class="quick-cart c" ng-click="access_json('jy_kefu/home//p=jy_merch&pid='+pagedata.myshop.id)">
				<i class="icon icon-lianxishangjia" style="font-size:1.2rem"></i>
				<div class="c" style="font-size:0.5rem;margin-top:-0.3rem">联系商家</div>
			</div>
			<div class="quick-info" style="">
				<div ng-if="pagedata.allnum>0" class="dot2" style="display: block; top:0;">{{pagedata.allnum}}</div>
				<i ng-click="pagedata.showcarts=true" ng-class="{'icon icon-peisong':1,'yellow2':pagedata.allnum>0}" style="line-height:2.5rem;padding:0.3rem 0.5rem;font-size:3rem;"></i>
				<div style="margin-left:4rem;color:#ffcb51">
					<div style="line-height:1rem;height:1rem">￥<span style="font-size:1rem;font-weight:400">{{pagedata.showprice}}</span></div>
					<div style="line-height:1rem;height:1rem;color:#9e9e9e;font-size:0.5rem">最终优惠金额,以下单为准</div>
				</div>
			</div>
			<div ng-if="!pagedata.allnum || pagedata.myshop.out_price>pagedata.totalprice" class="quick-submit remark" style="background: #000;color:#9e9e9e;">
				<span>¥{{pagedata.myshop.out_price || '10.00'}}起送 </span> 
			</div>
			<div ng-if="pagedata.allnum>0 && pagedata.myshop.out_price<=pagedata.totalprice" class="quick-submit remark bold" href="javascript:;" ng-click="access_json('jy_city/order.create//merchid='+pagedata.myshop.id)" style="background: #ffcb51;color:#000;">
				去结算
			</div>
		</div>
		<div ng-if="pagedata.myshop.offline==1 && pagedata.showlist=='goods'" class="fui-footer quick" style="box-shadow:0 0 0 rgba(0,0,0,0);height:3rem;background: none;padding:0.2rem 0.5rem">
			<div class="quick-cart c">
				<i class="icon icon-lianxishangjia" style="font-size:1.2rem;color:#9e9e9e"></i>
				<div class="c" style="font-size:0.5rem;margin-top:-0.3rem;color:#9e9e9e">联系商家</div>
			</div>
			<div class="quick-info" style="border-top-right-radius: 1.35rem;border-bottom-right-radius: 1.35rem;">
					<div style="text-align:center;line-height:1.8rem;height:1.8rem;color:#9e9e9e;font-size:0.8rem">商家休息</div>
			</div>
		</div>
		<div class="mask mask-cart"></div>
</div>
<div ng-include="sys_html('shop/_goodsdetail','','','jy_weishop')"></div>
<div ng-include="sys_html('common/_gotop',true)"></div>
<div ng-include="sys_html('common/_share','','','jy_weishop')"></div>
<script type="text/javascript">
scope.pagedata.nowckey = 0;  //状态标记
//刷新总数和总价
scope.pagedata.refresh=function(){
	var allnum=0
	var totalprice=0
	angular.forEach(scope.pagedata.carts,function(cart){
		allnum+=parseInt(cart.total);
		totalprice+=cart.total*cart.price;
	});
	scope.pagedata.allnum=allnum
	scope.pagedata.totalprice=totalprice
	scope.pagedata.showprice=scope.price(scope.pagedata.totalprice);
	scope.$evalAsync();
}
scope.pagedata.get_list=function(isfirst){
		var url='jy_merch/myshop/list/'
		if(isfirst){
			if(!scope.pagedata.params){
				scope.pagedata.params={};
			}
			scope.pagedata.params.page=1;
			scope.pagedata.loaded=false;
		}else if(scope.pagedata.loaded || scope.pagedata.loading){
			return;
		}
		scope.pagedata.loading=true;
		$('#loading_show').show();
		if(typeof(url)!='object'){
			url=scope.tool.links(url);
		}
		var query=scope.made_query(scope.pagedata.params);
		if(url.query){
			url.query+='&'+query;
		}else{
			url.query=query;
		}
		//console.log('query');console.log(query);
		scope.get(url,function(res){
			scope.pagedata.loading=false;
			$('#loading_show').hide();
			if(!scope.pagedata.goodslist || isfirst){
				scope.pagedata.goodslist=[];
				if(scope.pagedata.fromgoods && scope.pagedata.fromgoods.id && scope.pagedata.nowckey==0){
					scope.pagedata.goodslist.push(scope.pagedata.fromgoods);
				}
			}
			if(res=='none'){
				scope.pagedata.loaded=true;
				return;
			}
			if(!Array.isArray(res)){
				var list=res.list?res.list:[]
			}else{
				var list=res
			}
			if(list.length==0 || (scope.pagedata.psize && list.length<scope.pagedata.psize)){
				scope.pagedata.loaded=true;
			}
			list.forEach(function(row){
				if(scope.pagedata.fromgoods && scope.pagedata.fromgoods.id && scope.pagedata.nowckey==0 && row.id==scope.pagedata.fromgoods.id){
					//留
				}else{
					scope.pagedata.goodslist.push(row);
				}
			});
			scope.pagedata.params.page++;
			scope.$evalAsync();
		});
}
scope.pagedata.get_list(true);
scope.pagedata.scroll_bottom=function(){
	scope.pagedata.get_list();
}
//减少
scope.pagedata.minus=function(g,iscart){
	var cartid=g.cartid
	var goodsid=g.id;
	var carttotal=g.carttotal;
	if(iscart){
		carttotal=g.total
		cartid=g.id
		goodsid=g.goodsid
	}
	if(carttotal<=0){
		return false;
	}
	scope.post_json('jy_weishop/member.cart/minus/',{'merchid':scope.pagedata.myshop.id,'getlist':true,'id':cartid},function(res){
			if(iscart){
				g.total--
				for (j = 0; j < scope.pagedata.goodslist.length; j++) {
						if(scope.pagedata.goodslist[j].id==goodsid){
							scope.pagedata.goodslist[j].carttotal=g.total
						}
				}
				for (var i = 0; i < scope.pagedata.category.length; i++) {
						if(scope.pagedata.category[i].id==g.pcate){
							scope.pagedata.category[i].total--
						}
				}
			}else{
				scope.pagedata.category[scope.pagedata.nowckey].total--
			}
			if(res!='success'){
				g.carttotal--;
				scope.pagedata.carts=res.list
				scope.pagedata.dispatchprice=res.dispatchprice?res.dispatchprice:0;
				scope.pagedata.refresh();
			}
	});
}
//增加
scope.pagedata.plus=function(g,iscart){
	var cartid=g.cartid
	var goodsid=g.id;
	var carttotal=g.carttotal;
	if(iscart){
		carttotal=g.total
		goodsid=g.goodsid
		cartid=g.id
		if(g.optionid>0){
			if(carttotal>=g.options.stock){
				scope.message('不能再添加了，已超过库存！','error');
				return false;
			}
		}else{
			if(carttotal>=g.goodstotal){
				scope.message('不能再添加了，已超过库存！','error');
				return false;
			}
		}
	}else{
		g.optionid=0;
		if(carttotal>=g.total){
			scope.message('不能再添加了，已超过库存！','error');
			return false;
		}
	}	
	scope.post_json('jy_weishop/member.cart/addtocart/',{'getlist':true,'goodsid':goodsid,'optionid':g.optionid,'merchid':scope.pagedata.myshop.id},function(res){
			if(iscart){
				g.total++
				var category=scope.pagedata.category
				for (j = 0; j < scope.pagedata.goodslist.length; j++) {
						if(scope.pagedata.goodslist[j].id==goodsid){
							scope.pagedata.goodslist[j].carttotal=g.total
						}
				}
				for (var i = 0; i < scope.pagedata.category.length; i++) {
						if(scope.pagedata.category[i].id==g.pcate){
							scope.pagedata.category[i].total++
						}
				}
			}else{
				if(res.cartid>0){
					g.cartid=res.cartid;
				}
				scope.pagedata.category[scope.pagedata.nowckey].total++
			}
			if(res!='success'){
				g.carttotal++;
				scope.pagedata.carts=res.list
				scope.pagedata.dispatchprice=res.dispatchprice?res.dispatchprice:0;
			}
			scope.pagedata.refresh();
	});
}
//减少
scope.pagedata.sp_minus=function(){
	var g =scope.pagedata.g;
	if(g.carttotal<=0){
		return false;
	}
	scope.post_json('jy_weishop/member.cart/minus/',{'merchid':scope.pagedata.myshop.id,'getlist':true,'id':g.cartid,'optionid':g.options.id},function(res){
			g.carttotal--;
			if(g.post[g.options.id].num<=0){
				return false;
			}
			scope.pagedata.dispatchprice=res.dispatchprice?res.dispatchprice:0;
			scope.pagedata.carts=res.list
			g.post[g.options.id].num--;
			scope.pagedata.category[scope.pagedata.nowckey].total--
			scope.pagedata.goodslist[scope.pagedata.nowgkey]=g
			scope.pagedata.refresh();
			
	});
}
//增加
scope.pagedata.sp_plus=function(){
	var g =scope.pagedata.g;
	if(g.carttotal>=g.options.stock){
		scope.message('不能再添加了，已超过库存！','error');
		return false;
	}
	scope.post_json('jy_weishop/member.cart/addtocart/',{'getlist':true,'goodsid':g.id,'optionid':g.options.id,'merchid':scope.pagedata.myshop.id},function(res){
			if(res!='success'){
				g.carttotal++;
				g.post[g.options.id].num++;
				scope.pagedata.dispatchprice=res.dispatchprice?res.dispatchprice:0;
				if(res.cartid>0){
					g.cartid=res.cartid;
				}
				scope.pagedata.carts=res.list
			}
			scope.pagedata.category[scope.pagedata.nowckey].total++
			scope.pagedata.goodslist[scope.pagedata.nowgkey]=g
			scope.pagedata.refresh();
	});
}
//选择
scope.pagedata.get_optionsid=function(){
	var specid = scope.pagedata.g.specid;
	specid = specid.join('_');
	scope.post_json('jy_weishop/goods.detail/get_optionsid/',{'goodsid':scope.pagedata.g.id,'specid':specid,'isdish':1},function(res){
			var optionsid=res.options.id;
			scope.pagedata.g.options=res.options;
			scope.pagedata.g.selespename=res.selespename;
			if(!scope.pagedata.g.post[optionsid]){
				scope.pagedata.g.post[optionsid]={}
				scope.pagedata.g.post[optionsid]={
					'num':scope.pagedata.g.post[optionsid].num?scope.pagedata.g.post[optionsid].num:res.carttotal,
					'title':res.selespename,
				}
			}
			
			scope.$evalAsync();
	});
}
scope.pagedata.refresh();
scope.pagedata.openLocation=function(item){
	wx.openLocation({
	latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
	longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
		name: item.merchname, // 位置名
		address: item.address, // 地址详情说明
		scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
		infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
		success:function(){
			//alert(1111);
		}
	});
}
</script>